home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / usr / include / konqsidebarplugin.h < prev    next >
C/C++ Source or Header  |  2008-03-25  |  3KB  |  103 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2001,2002 Joseph Wenninger <jowenn@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19. #ifndef _konqsidebarplugin_h_
  20. #define _konqsidebarplugin_h_
  21. #include <QtGui/QWidget>
  22. #include <QtCore/QObject>
  23. #include <kurl.h>
  24.  
  25. #include <kparts/part.h>
  26. #include <kparts/browserextension.h>
  27. #include <kio/job.h>
  28. #include <QtCore/QPointer>
  29. #include <kfileitem.h>
  30. #include <kcomponentdata.h>
  31.  
  32. #ifndef KONQSIDEBARPLUGIN_EXPORT
  33. # if defined(MAKE_KONQSIDEBARPLUGIN_LIB)
  34.     /* We are building this library */
  35. #  define KONQSIDEBARPLUGIN_EXPORT KDE_EXPORT
  36. # else
  37.    /* We are using this library */
  38. #  define KONQSIDEBARPLUGIN_EXPORT KDE_IMPORT
  39. # endif
  40. #endif
  41.  
  42. class KonqSidebarPluginPrivate;
  43.  
  44. class KONQSIDEBARPLUGIN_EXPORT KonqSidebarPlugin : public QObject
  45. {
  46.     Q_OBJECT
  47.     public:
  48.         KonqSidebarPlugin(const KComponentData &componentData,QObject *parent,QWidget *widgetParent,QString &desktopName_, const char* name=0);
  49.         ~KonqSidebarPlugin();
  50.         virtual QWidget *getWidget()=0;
  51.         virtual void *provides(const QString &)=0;
  52.         const KComponentData &parentInstance();
  53.     protected:
  54.         virtual void handleURL(const KUrl &url)=0;
  55.         virtual void handlePreview(const KFileItemList & items);
  56.         virtual void handlePreviewOnMouseOver(const KFileItem &items); //not used yet, perhaps in KDE 3.1
  57.         QString desktopName;
  58.         KComponentData m_parentInstance;
  59.  
  60.     private:
  61.         KonqSidebarPluginPrivate const *d;
  62.  
  63.     Q_SIGNALS:
  64.         void requestURL(KUrl&);
  65.         void started(KIO::Job *);
  66.         void completed();
  67.         void setIcon(const QString& icon);
  68.         void setCaption(const QString& caption);
  69.  
  70.  
  71.     protected:
  72.         bool universalMode();
  73.     public Q_SLOTS:
  74.       void openUrl(const KUrl& url);
  75.  
  76.       void openPreview(const KFileItemList& items);
  77.  
  78.       void openPreviewOnMouseOver(const KFileItem& item); // not used yet, perhaps KDE 3.1
  79.     /*
  80.         if your plugin supports a setup dialog, instead (replaces the url menu entry in the popup) (not supported yet)
  81.             void setup(QWidget *parent);
  82.  
  83.      */
  84.  
  85.  
  86.     /* signals, which could be, but need not to be added
  87.  
  88.         void openUrlRequest( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
  89.           void createNewWindow( const KUrl &url, const KParts::URLArgs &args = KParts::URLArgs() );
  90.  
  91.         void enableAction( const char * name, bool enabled );
  92.  
  93.         void popupMenu( ... );
  94.  
  95.         void showError(QString &);    //for later extension
  96.         void showMessage(QString &);    //for later extension
  97.  
  98.     */
  99.  
  100. };
  101.  
  102. #endif
  103.